package com.cvnert.testplatform.domain;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * 
 * @TableName defect
 */
@Data
public class Defect implements Serializable {
    /**
     * 
     */
    @TableId(value = "id" , type = IdType.AUTO)
    private Integer id;

    /**
     * 缺陷名字
     */
    private String defectname;

    /**
     * 缺陷等级
     */
    private String defectlevel;

    /**
     * 缺陷创建者(uid)
     */
    private String defectperson;

    /**
     * 缺陷指派(uid)
     */
    private String defectassign;
    /**
     * 缺陷内容
     */
    private String defectmain;

    /**
     * 缺陷完成情况(1-创建，2-完成，3-重新打开，4关闭)
     */
    private String defectstatus;

    /**
     * 缺陷建立时间
     */
    private LocalDateTime createtime;

    /**
     * 缺陷更新时间
     */
    private LocalDateTime updatetime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Defect other = (Defect) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDefectname() == null ? other.getDefectname() == null : this.getDefectname().equals(other.getDefectname()))
            && (this.getDefectlevel() == null ? other.getDefectlevel() == null : this.getDefectlevel().equals(other.getDefectlevel()))
            && (this.getDefectperson() == null ? other.getDefectperson() == null : this.getDefectperson().equals(other.getDefectperson()))
            && (this.getDefectassign() == null ? other.getDefectassign() == null : this.getDefectassign().equals(other.getDefectassign()))
            && (this.getDefectstatus() == null ? other.getDefectstatus() == null : this.getDefectstatus().equals(other.getDefectstatus()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDefectname() == null) ? 0 : getDefectname().hashCode());
        result = prime * result + ((getDefectlevel() == null) ? 0 : getDefectlevel().hashCode());
        result = prime * result + ((getDefectperson() == null) ? 0 : getDefectperson().hashCode());
        result = prime * result + ((getDefectassign() == null) ? 0 : getDefectassign().hashCode());
        result = prime * result + ((getDefectstatus() == null) ? 0 : getDefectstatus().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", defectname=").append(defectname);
        sb.append(", defectlevel=").append(defectlevel);
        sb.append(", defectperson=").append(defectperson);
        sb.append(", defectassign=").append(defectassign);
        sb.append(", defectstatus=").append(defectstatus);
        sb.append(", createtime=").append(createtime);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}